package com.bingxue.edu.management.education.model.req;

import com.bingxue.edu.common.enums.LessonStatusEnum;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.time.LocalDate;
import java.time.LocalTime;

import static com.bingxue.edu.common.constant.DateConstants.FORMAT_TIME_HHmm;

/**
 * 创建或修改班级课次信息
 */
@Data
@Schema(description = "创建或修改班级课次信息")
public class LessonReq {

    @Schema(description = "课次标题")
    @NotBlank(message = "课次标题不能为空")
    private String title;

    @Schema(description = "班级id")
    @NotBlank(message = "班级id不能为空")
    private String classId;

    @Schema(description = "教室id")
    @NotBlank(message = "教室id不能为空")
    private String classroomId;

    @Schema(description = "校区id")
    @NotBlank(message = "校区id不能为空")
    private String campusId;

    @Schema(description = "主讲老师")
    @NotBlank(message = "主讲老师不能为空")
    private String leadTeacherId;

    @Schema(description = "辅导老师")
    private String assistTeacherId;

    @Schema(description = "上课日期")
    private LocalDate lessonDate;

    @NotNull(message = "开始时间不能为空")
    @JsonFormat(pattern = FORMAT_TIME_HHmm)
    private LocalTime startTime;

    @NotNull(message = "结束时间不能为空")
    @JsonFormat(pattern = FORMAT_TIME_HHmm)
    private LocalTime endTime;

    @Schema(description = "enum-课次状态")
    private LessonStatusEnum lessonStatus;

    @Schema(description = "备注")
    private String description;
}
